<?
require("config.php");

$location_status .= "| Add";
$show_backnav = "menu";
$menutype = 2;

if (NULL!=$action){

   $field = array(
	  "code",
	  "content",
	  "testimonial",
	  "publish",
	  "description1",
	  "currency1",
	  "fee1",
	  "publish1",
	  "description2",
	  "currency2",
	  "fee2",
	  "publish2",
	  "description3",
	  "currency3",
	  "fee3",
	  "publish3",
	  "description4",
	  "currency4",
	  "fee4",
	  "publish4",
	  "description5",
	  "currency5",
	  "fee5",
	  "publish5",
	  "description6",
	  "currency6",
	  "fee6",
	  "publish6",
	  "description7",
	  "currency7",
	  "fee7",
	  "publish7",
	  "description8",
	  "currency8",
	  "fee8",
	  "publish8",
	  "description9",
	  "currency9",
	  "fee9",
	  "publish9",
	  "description10",
	  "currency10",
	  "fee10",
	  "publish10",
	);

   $content = array(
		$Code,
		$Content,
		$Testimonial,
		$Publish,
		$Description1,
		$Currency1,
		$Fee1,
		$Publish1,
		$Description2,
		$Currency2,
		$Fee2,
		$Publish2,
		$Description3,
		$Currency3,
		$Fee3,
		$Publish3,
		$Description4,
		$Currency4,
		$Fee4,
		$Publish4,
		$Description5,
		$Currency5,
		$Fee5,
		$Publish5,
		$Description6,
		$Currency6,
		$Fee6,
		$Publish6,
		$Description7,
		$Currency7,
		$Fee7,
		$Publish7,
		$Description8,
		$Currency8,
		$Fee8,
		$Publish8,
		$Description9,
		$Currency9,
		$Fee9,
		$Publish9,
		$Description10,
		$Currency10,
		$Fee10,
		$Publish10,
	);

   myInsert($table,$field,$content);


   header("location:" . $rela_path . "share/msg.php?v=761");

   exit();

}

if (checkCode($table,$Code)){

	header("location:" . $rela_path . "share/msg.php?v=9001");
	exit();
}


require($rela_path . "inc/header.php");
require($rela_path . "bin/date.php");
require($rela_path . "bin/country.php");
?> 
<form action="" method="post" enctype="multipart/form-data" name="form1">
<!--hidden filed-->
<input name="action" type="hidden" value="add">
<input name="Code" type="hidden" value="<?print($Code)?>">

  <table width="95%" border="0" align="center">
    <tr> 
      <td align="right"> <input name="image" type="image" onclick="Redirect('menu.php',1);return false;" src="../../images/bt_cancel.gif" width="78" height="23"> 
        <input name="image" type="image" src="../../images/bt_save.gif" width="76" height="22"  <?print($active)?>> 
      </td>
    </tr>
  </table>
  <table width="95%" border="0" align="center">
    <tr> 
      <td align="right">&nbsp; </td>
    </tr>
    <tr> 
      <td><table border="0">
          <tr> 
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
          <tr> 
            <td class="tdheader">Code :</td>
            <td> <?print($Code)?> </td>
          </tr>


          <tr> 
            <td class="tdheader">Text :</td>
            <td><textarea class="text" name="Content" cols="60" rows="6"></textarea></td>
          </tr>


          <tr> 
            <td class="tdheader">Testimonial :</td>
            <td><textarea class="text" name="Testimonial" cols="60" rows="6"></textarea></td>
          </tr>

          <tr> 
            <td class="tdheader">Publish :</td>
            <td> 
              <?

$sourceData = array(
  "0",
  "1",
  );

$sourceLabel = array(
  "Yes",
  "No",
  );


$boxName="Publish";

FFPCheckBox("Publish",$Publish,$sourceData,$sourceLabel);

?>
          </tr>



<?for ($i=1;$i<11;$i++){
	
$v1 = "Currency$i";
$v2 = "Fee$i";
$v3 = "Description$i";
$v4 = "Publish$i";
	?>
          <tr> 
            <td class="tdheader">Fee <?=$i?>:</td>
            <td>
<TABLE>
<TR>
	<TD>Currency:</TD>
	<TD><input type="text" name="<?="Currency$i"?>" size=5 class="text" value="<?=$$v1?>"></TD>
</TR>
<TR>
	<TD>Fee:</TD>
	<TD><input type="text" name="<?="Fee$i"?>" size=18 class="text" value="<?=$$v2?>"></TD>
</TR>
<TR>
	<TD>Description:</TD>
	<TD><textarea rows=5 cols=40 class=text name="<?="Description$i"?>"><?=$$v3?></textarea></TD>
</TR>
<tr> 
<td>Publish :</td>
<td> 
              <?

$sourceData = array(
  "0",
  "1",
  );

$sourceLabel = array(
  "Yes",
  "No",
  );



FFPCheckBox($v4,$$v4,$sourceData,$sourceLabel);

?>
</tr>

</TABLE>
            </td>
          </tr>



<?}?>




          <tr> 
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
        </table></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
    </tr>
  </table>
  <table width="95%" border="0" align="center">
    <tr> 
      <td align="right"> <input name="image2" type="image" onclick="Redirect('menu.php',1);return false;" src="../../images/bt_cancel.gif" width="78" height="23"> 
        <input name="image2" type="image" src="../../images/bt_save.gif" width="76" height="22" <?print($active)?>> 
      </td>
    </tr>
  </table>
</form>
<?
require($rela_path . "inc/footer.php");
?>

